<?php
/**
 * User: fu
 * Date: 12-3-5
 * Time: 下午3:12
 */
?>
<h2 class="formdesc">
    目录：
    <?php
    $manaarr=$manage->querymid($mid);
    echo $manaarr[0]['cat_name'];

    ?>
</h2>

<?php echo $actinfo;?>
<div class="pricnav">
    <a href="<?php echo $_SERVER['PHP_SELF'] . '?act=add&mid='.$mid?>">发布新内容</a>
    <a href="<?php echo $_SERVER['PHP_SELF'] . '?act=gen&mid='.$mid?>">重新生成</a>
    <a href="<?php echo SITEDIR.$manaarr[0]['list_flie']?>" target="_blank">查看文件列表</a>
</div>

<table class="table1">
    <thead>
    <tr>
        <?php
        if (!empty($publistharr)) {
            foreach ($publistharr[0] as $k => $v) {
                printf('<th>%s</th>', $k);
            }

        }
        ?>
        <th></th>
        <th></th>
        <th></th>
    </tr>
    </thead>
    <tbody>
    <?php
    if (!empty($publistharr)) {
        $i=0; $classname=array('odd','even');
        foreach ($publistharr as $val) {
            printf('<tr class="%s">',$classname[$i++%2]);
            foreach ($val as $v) {
                printf('<td>%s</td>', $v);
            }
            printf('<td><a class="btn" href="%s&id=%s">删除</a></td>', $_SERVER['PHP_SELF'] . '?act=del&mid='.$mid, $val['id']);
            printf('<td><a class="btn" href="%s&id=%s">修改</a></td>', $_SERVER['PHP_SELF'] . '?act=alt&mid='.$mid, $val['id']);
            printf('<td><a target="_blank" class="btn" href="%s">查看文件</a></td>',SITEDIR.str_replace('@id',$val['id'],$manaarr[0]['name_rule']));
            echo '</tr>';
        }
    }


    ?>

    </tbody>
</table>
<div class="page">
    <?php
    echo $page->getlink(5, '<a   href="' . Fun::curcul('/&page=\d+/') . '&page=%d">%d</a>', '&page=');
    echo $page->getnextlink('<a href="'.Fun::curcul('/&page=\d+/').'&page=%d">下一页</a>');
   ?>
</div>


